package view.main;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import org.pushingpixels.substance.api.SubstanceLookAndFeel;
import org.pushingpixels.substance.api.skin.AutumnSkin;
import org.pushingpixels.substance.api.skin.CremeSkin;
import org.pushingpixels.substance.api.skin.NebulaSkin;
import org.pushingpixels.substance.api.skin.OfficeSilver2007Skin;

import javax.swing.JMenuBar;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JTabbedPane;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.border.TitledBorder;
import javax.swing.JTextPane;
import java.awt.Font;

public class MainMenu_new extends JFrame {

	static JPanel contentPane;
//	private JTabbedPane tabbedPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		JFrame.setDefaultLookAndFeelDecorated(true);
		JDialog.setDefaultLookAndFeelDecorated(true);
		
		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
//					SubstanceLookAndFeel.setSkin(new OfficeS ilver2007Skin());
					SubstanceLookAndFeel.setSkin(new CremeSkin() );//这个可以
//					SubstanceLookAndFeel.setSkin(new NebulaSkin());
					MainMenu_new frame = new MainMenu_new();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public MainMenu_new() {
		//获取屏幕分辨率
//	    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
//	    setBounds(0, 0, (int) screenSize.getWidth(), (int) screenSize.getHeight()-30);
		
	    this.setExtendedState(JFrame.MAXIMIZED_BOTH);//全屏显示
	    
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1056, 715);
//		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
//		tabbedPane.TOP:
		BtnActionListener btnClick = new BtnActionListener();
		
		
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JButton btnNewButton = new JButton("日常事务");
		menuBar.add(btnNewButton);
		btnNewButton.addActionListener(btnClick);
		
		JButton btnNewButton_1 = new JButton("统计分析");
		menuBar.add(btnNewButton_1);
		btnNewButton_1.addActionListener(btnClick);
		
		JButton btnNewButton_2 = new JButton("人员管理");
		menuBar.add(btnNewButton_2);
		btnNewButton_2.addActionListener(btnClick);
		
		JButton btnNewButton_3 = new JButton("软件教程");
		menuBar.add(btnNewButton_3);
		btnNewButton_3.addActionListener(btnClick);
		
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		
		
//		contentPane.add(btnClick.tab, BorderLayout.CENTER);
//		contentPane.add(tabbedPane, BorderLayout.CENTER);
		contentPane.setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		contentPane.add(panel, BorderLayout.CENTER);
		panel.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("欢迎使用！");
		lblNewLabel.setFont(new Font("宋体", Font.BOLD, 60));
		lblNewLabel.setBounds(728, 482, 618, 231);
		panel.add(lblNewLabel);
		
//		JPanel panel = new JPanel();
//		tabbedPane.addTab("点餐/用餐", null, panel, null);
	}
}
